﻿using Microsoft.AspNetCore.Mvc;
using StarsAdmin.Application.Menu.Dtos;
using StarsAdmin.Core.BaseService;
using StarsAdmin.Core.DI;
using StarsAdmin.Core.Models;

namespace StarsAdmin.Application.Menu.Services
{
    public interface IMenuService :
        IGetBaseService<MenuDto>,
        IUpdateBaseService<AddMenuInput, UpdateMenuInput>,
        IExportOrImportService<AddMenuInput>,
        IDeleteBaseService,
        IDependency
    {
        /// <summary>
        /// 分配权限
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<bool> AssignPermissionsAsync(AssignPermissionsInput input);

        /// <summary>
        /// 启用
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        Task<bool> EnabledAsync(long id);

        /// <summary>
        /// 排序
        /// </summary>
        /// <param name="id"></param>
        /// <param name="targetId"></param>
        /// <returns></returns>
        Task<bool> SortableAsync(long id, long targetId);

        /// <summary>
        /// 导出模版
        /// </summary>
        /// <returns></returns>
        Task<FileContentResult?> ExportTemplateAsync();
    }
}